<!-- 账单记录管理 -->
<script setup lang="ts">
// 弹窗对象
const dialog = reactive({
  visible: false,
});

const props = defineProps({
  title: {
    type: String,
    default: "",
  },
  width: {
    type: Number,
    default: 1000,
  },
});
const listComp = ref();
const queryParams = ref();
/**
 * 打开弹窗
 *
 */
function openDialog(params: any) {
  queryParams.value = params;
  dialog.visible = true;
}

/**
 * 关闭弹窗
 *
 */
function closeDialog() {
  dialog.visible = false;
}

defineExpose({ openDialog });
</script>

<template>
  <!-- 弹窗 -->
  <el-dialog
    v-model="dialog.visible"
    :title="title"
    :width="width"
    append-to-body
    lock-scroll
    destroy-on-close
    @close="closeDialog"
  >
    <BillRecordList
      :readOnly="true"
      :defaultQueryParams="queryParams"
      :autoScroll="false"
      ref="listComp"
    />
  </el-dialog>
</template>
